<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>首页</title>
    <link rel="stylesheet" _href="/index.css" href="../public/index.css">
    <script>
        let links = document.getElementsByTagName('link');
        if (links) {
            for (let i = 0; i < links.length; i++) {
                const link = links[i];
                if (link.getAttribute('_href')) {
                    link.href = link.getAttribute('_href');
                }
            }
        }
    </script>
</head>

<body>
    <div class='block'>
        <ul>
            <% 
                    if('list' in blockData){
                    for(let i=0;i<blockData.list.length;i++){
                        const block=blockData.list[i];
                        %>
                <li>
                    <a href="/article?id=<%=block.id%>">
                        <%=block.name%>
                    </a>
                </li>
                <%}
                    }%>
        </ul>
    </div>
</body>

</html>